ImageGear Professional DLL for Windows
More Examples

Pattern

Description

(\\d{4} ){3}\\d{4}

This pattern finds the standard 16-digit credit card number:

  • 1234 5678 9012 3456

(\\(?\\d{3}\\)?-?)?\\d{3}-?\\d{4}

This pattern matches phone numbers written in a format that is standard in the United States (though it sometimes will match numbers in a non-standard format). Numbers written in the following formats match this pattern:

  • (555)-222-1234
  • (555)222-1234
  • (555)2221234
  • 555-222-1234
  • 222-1234
  • 2221234
  • 5552221234

Poorly formatted numbers this may match are:

  • (555-222-1234
  • 555)-222-1234
  • 555222-1234
  • (555-2221234
  • 555)-2221234

\\d{3}-?\\d{2}-?\\d{4}

This pattern matches social security numbers, whether or not they are delimited by dashes:

  • 078-05-1120
  • 07805-1120
  • 078-051120
  • 078051120

\\$(\\d|,\\d)+(\\.\\d\\d)?

This pattern matches monetary amounts, preceded by a "$" sign:

  • $20,000.00
  • $20
  • $20.00
  • $20,0.00 (a more specific pattern would be required to ensure that a comma is followed by at least 3 digits)

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback